package com.alibaba.hello.validate;

import com.alibaba.roma.core.form.validation.ValidatorRule;

public class LengthValidator implements ValidatorRule<String> {
	public boolean validate(String fieldValue) {
		if (fieldValue == null || fieldValue.length() < 5
				|| fieldValue.length() > 10)
			return false;
		return true;
	}
}
